<?
ob_start();
session_start();
include("../conf/config.php");
include("../conf/database.php");
include("../conf/tools.php");

$curTime=getIndianDateTime();


foreach($_POST as $key => $value) { $arr_data[$key]=$value;}
foreach($arr_data as $key => $value) { $arr_data[$key]=addslashes($value); }


$arr_data["rec_status"]=1;
$req_id=$_GET["req_id"];


if($req_id>0){

update_qry("bkitc_product_subscription",$arr_data,"rec_id=".$req_id);
qry_data("update bkitc_product_subscription set last_updated='".$curTime."' where rec_id=".$req_id);

}
else{

	$req_id=insert_qry("bkitc_product_subscription",$arr_data);
	qry_data("update bkitc_product_subscription set rec_created='".$curTime."' where rec_id=".$req_id);
}

if($arr_data["req_status"]==1){


send_avsubscribe_notify($arr_data);

}


header("location:edit_subav.php?mode=edit&req_id=".$req_id);
?>



